package com.moli.iov.base.enums;

/**
 * The enum Install status enum.
 *
 * @author wanghualin
 * @date 2019-09-29 16:30:18
 */
public enum InstallStatusEnum {
  NO(0,"未安装"),
  YES(1,"已安装");

  private int code;

  private String cnName;

  private InstallStatusEnum(int code, String cnName) {
    this.code = code;
    this.cnName = cnName;
  }

  public int getCode() {
    return code;
  }

  public String getCnName() {
    return cnName;
  }

  public void setCode(int code) {
    this.code = code;
  }

  public void setCnName(String cnName) {
    this.cnName = cnName;
  }
  public static String getCodeName(int code) {
    for (InstallStatusEnum e : InstallStatusEnum.values()) {
      if (e.code == code) {
        return e.cnName;
      }
    }
    return null;
  }
}
